<html>
<head><meta charset="utf-8"><title>git-untracked-files · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html">git-untracked-files</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="158964445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158964445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dale Wijnand <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158964445">(Feb 20 2019 at 10:38)</a>:</h4>
<p>Hey.  Am I doing something wrong? After making a change and running <code>./x.py check</code> <code>git status</code> shows:</p>
<div class="codehilite"><pre><span></span>Untracked files:
  (use &quot;git add &lt;file&gt;...&quot; to include in what will be committed)

    src/llvm/
    src/tools/clang/
    src/tools/lld/
    src/tools/lldb/
</pre></div>


<p>Additionally there's <code>src/libcompiler_builtins</code>.</p>
<p>The effect is that when I add all changed files and commit, via <code>git add -A</code>, I have to go back and <code>git rm --cached</code> these directories.  Is there some part of local setup that I have to do?</p>



<a name="158965128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158965128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158965128">(Feb 20 2019 at 10:50)</a>:</h4>
<p>I don't think you are doing anything wrong</p>



<a name="158965152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158965152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158965152">(Feb 20 2019 at 10:50)</a>:</h4>
<p>well</p>



<a name="158965154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158965154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158965154">(Feb 20 2019 at 10:50)</a>:</h4>
<p>it depends on how one defines "wrong"</p>



<a name="158965161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158965161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158965161">(Feb 20 2019 at 10:50)</a>:</h4>
<p>my suspicion is that you manually tried to grab the submodules</p>



<a name="158965174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158965174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158965174">(Feb 20 2019 at 10:51)</a>:</h4>
<p>either now or at some point in the past</p>



<a name="158965180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158965180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158965180">(Feb 20 2019 at 10:51)</a>:</h4>
<p>at least, I have seen effects like this on my repository</p>



<a name="158965192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158965192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158965192">(Feb 20 2019 at 10:51)</a>:</h4>
<p>and my best guess is that its because our bootstrapping system isn't quite perfect in its handling of submodules.</p>



<a name="158966780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158966780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158966780">(Feb 20 2019 at 11:25)</a>:</h4>
<p>Alternatively, if your checkout is old, or you ever did anything to the submodules in an older commit, movement of these submodules may leave old "untracked" directories around.</p>



<a name="158967963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158967963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158967963">(Feb 20 2019 at 11:50)</a>:</h4>
<p>I have that problem all the time -- due to what <span class="user-mention" data-user-id="123586">@nagisa</span> said -- I usually just delete the old directories, <span class="user-mention" data-user-id="125311">@Dale Wijnand</span></p>



<a name="158967996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158967996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158967996">(Feb 20 2019 at 11:51)</a>:</h4>
<p>Yeah, I've found that when a submodule moves or is removed upstream (ie. <code>src/llvm</code> -&gt; <code>src/llvm-project</code>) then the directory shows up as untracked and I can just delete it.</p>



<a name="158970338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158970338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dale Wijnand <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158970338">(Feb 20 2019 at 12:33)</a>:</h4>
<p>Ah I see now the changes in <code>.gitmodules</code> for both the LLVM move and the removal of libcompiler_builtins..</p>
<p>Perhaps (in future) such submodule removes should come with gitignore additions.  By being tracked in the repo it helps everyone going forward but also for time-travellers they won't have their personal, global gitignore making things opaque.</p>
<p>Thank you.</p>



<a name="158992020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158992020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158992020">(Feb 20 2019 at 16:49)</a>:</h4>
<blockquote>
<p>such submodule removes should come with gitignore additions</p>
</blockquote>
<p>I'd be anti this. I don't need hidden, unused gigabytes of LLVM directories lying around.</p>



<a name="158995269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158995269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dale Wijnand <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158995269">(Feb 20 2019 at 17:32)</a>:</h4>
<p>Ah, yes.  Ironically that's why I didn't touch those directories because I was afraid of throwing away those precious bytes that would've made me 5-minute change another hour-long rebuild of LLVM.</p>



<a name="158995319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/git-untracked-files/near/158995319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dale Wijnand <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/git-untracked-files.html#158995319">(Feb 20 2019 at 17:33)</a>:</h4>
<p>Having and not having a subdmodule is referenced in <a href="https://git-scm.com/book/en/v2/Git-Tools-Submodules#_issues_with_submodules" target="_blank" title="https://git-scm.com/book/en/v2/Git-Tools-Submodules#_issues_with_submodules">https://git-scm.com/book/en/v2/Git-Tools-Submodules#_issues_with_submodules</a> <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>